<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<sec:authentication property="principal" var="currentPrincipal" scope="page"/>

<fmt:setBundle basename="ApplicationMessage"/>
<fmt:setLocale value="zh_CN"/>

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp" %>
  <%@ include file="/WEB-INF/include/css.jsp" %>

</head>

<body class="ms-theme-blue">

  <%@ include file="/WEB-INF/include/header.jsp" %>
  <%@ include file="/WEB-INF/include/submenu.jsp" %>

  <div class="container-fluid ms-container has-ms-sidemenu">

    <ol class="ms-breadcrumb breadcrumb">
      <li class="active">新增司机信息</li>
    </ol>

    <div class="ms-content-layout">

      <form class="form-horizontal ms-form form-personal-info" method="POST" action="${ctx.host}/drivers" data-redirect="${ctx.host}/drivers">

        <input type="hidden" name="companyId" value="${organizationId}" />

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2"><span class="color-red">*</span>工号：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="code" class="form-control" data-validate="required"  placeholder="工号" tabindex="2" autocomplete="off"/>
          </div>

          <label class="control-label col-xs-2"><span class="color-red">*</span>姓名：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="name" class="form-control" data-validate="required"  placeholder="姓名" tabindex="3" autocomplete="off"/>
          </div>
        </div>

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2"><span class="color-red">*</span>性别：</label>
          <div class="col-xs-3 pull-left">
            <select name="gender" class="select2 form-control" tabindex="4" data-validate="required">
              <option></option>
              <option value="60">男</option>
              <option value="61">女</option>
            </select>
          </div>

          <label class="control-label col-xs-2">文化程度：</label>
          <div class="col-xs-3 pull-left">
            <select name="educationLevel" class="select2 form-control" tabindex="5" >
              <option></option>
              <c:forEach items="${selection.masterData['EDUCATION']}" var="education">
                <option value="${education.code}">${education.value}</option>
              </c:forEach>
            </select>
          </div>
        </div>

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2"><span class="color-red">*</span>出生日期：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="birthday" data-validate="required" class="form-control date"  placeholder="出生日期" tabindex="6" autocomplete="off"/>
          </div>

          <label class="control-label col-xs-2"><span class="color-red">*</span>身份证号：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="citizenCode" class="form-control" data-validate="required" placeholder="身份证号" tabindex="7" autocomplete="off"/>
          </div>
        </div>

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2"><span class="color-red">*</span>现任职务：</label>
          <div class="col-xs-3 pull-left">
            <select name="dutyId" data-validate="required" class="select2 form-control" tabindex="8" >
              <option></option>
              <c:forEach items="${enums['DriverDuty']}" var="duty">
                <option value="${duty.id}">${duty.description}</option>
              </c:forEach>
            </select>
          </div>

          <label class="control-label col-xs-2">政治面貌：</label>
          <div class="col-xs-3 pull-left">
            <select name="clanId" class="select2 form-control" tabindex="9" >
              <option></option>
              <c:forEach items="${selection.masterData['PARTY']}" var="party">
                <option value="${party.code}">${party.value}</option>
              </c:forEach>
            </select>
          </div>
        </div>

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2">何时加入：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="joinDate" class="form-control date"  placeholder="加入时间" tabindex="10" autocomplete="off"/>
          </div>
          
          <label class="col-xs-2 control-label"><span class="color-red">*</span>准驾车型：</label>
          <div class="pull-left col-xs-3">
            <select name="drivingType" data-validate="required" class="select2 form-control" tabindex="26" >
              <option></option>
              <option value="01">A1</option>
              <option value="02">A2</option>
              <option value="03">B2</option>
              <option value="04">B1</option>
              <option value="05">C1</option>
            </select>
          </div>
          
          <%-- <c:if test="${not empty organizationId}">
	          <label class="control-label col-xs-2"><span class="color-red">*</span>所属交通工具：</label>
	          <div class="col-xs-3 modal-search-warp">
	            <input type="text" name="vehicle" class="form-control vehicle-search modal-search" data-validate="required"
	                 data-org="companyId" data-value-name="vehicleId" placeholder="请填写驳运车" data-modal-search="#modal-search-vehicle" tabindex="11" autocomplete="off">
	            <a href="javascript:void(0);" class="btn" data-koala-search="true" data-target="#modal-search-vehicle" data-toggle="modal">
	              <span class="glyphicon glyphicon-align-justify" aria-hidden="true"></span>
	            </a>
	          </div>
          </c:if> --%>
        </div>

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2">毕业学校：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="school" class="form-control"  placeholder="毕业学校" tabindex="12" autocomplete="off"/>
          </div>

          <label class="control-label col-xs-2">专业：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="speciality" class="form-control"  placeholder="专业" tabindex="13" autocomplete="off"/>
          </div>
        </div>

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2">学位：</label>
          <div class="col-xs-3 pull-left">
            <select name="degreeId" class="select2 form-control" tabindex="14" >
              <option></option>
              <c:forEach items="${selection.masterData['DEGREE']}" var="degree">
                <option value="${degree.code}">${degree.value}</option>
              </c:forEach>
            </select>
          </div>

          <label class="control-label col-xs-2">毕业年月：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="graduateDate" class="form-control date"  placeholder="毕业年月" tabindex="15" autocomplete="off"/>
          </div>
        </div>

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2">家庭地址：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="homeAddress" class="form-control"  placeholder="家庭地址" tabindex="16" autocomplete="off"/>
          </div>
          
          <label class="control-label col-xs-2">邮政编码：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="homeZipcode" data-validate="number" class="form-control"  placeholder="邮政编码" tabindex="17" autocomplete="off"/>
          </div>
        </div>

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2">联系地址：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="contactAddress" class="form-control"  placeholder="联系地址" tabindex="18" autocomplete="off"/>
          </div>

          <label class="control-label col-xs-2">通讯地址邮政编码：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="contactZipcode" data-validate="number" class="form-control"  placeholder="通讯地址邮政编码" tabindex="19" autocomplete="off"/>
          </div>
        </div>

        <div class="form-group  ms-form-group">
          <label class="control-label col-xs-2">联系人姓名：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="contactorName" class="form-control"  placeholder="联系人姓名" tabindex="20" autocomplete="off"/>
          </div>

          <label class="control-label col-xs-2">称谓：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="contactorAppellation" class="form-control"  placeholder="称谓" tabindex="21" autocomplete="off"/>
          </div>
        </div>

        <div class="form-group ms-form-group">
          <label class="control-label col-xs-2"><span class="color-red">*</span>手机电话：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="mp" data-validate="required|mobile" class="form-control" placeholder="手机号码" tabindex="22" autocomplete="off"/>
          </div>

          <label class="control-label col-xs-2">固定电话：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="tel" class="form-control"  placeholder="固定电话" tabindex="23" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-2"><span class="color-red">*</span>驾龄：</label>
          <div class="col-xs-3 pull-left">
            <input type="text" name="drivingAge" data-validate="required|number" class="form-control"  placeholder="驾龄" tabindex="24" autocomplete="off"/>
          </div>
          
          <label class="control-label col-xs-2"><span class="color-red">*</span>劳务合同签署方：</label>
          <div class="col-xs-3 pull-left">
            <select name="contractParty" data-validate="required" class="select2 form-control" tabindex="25">
              <option></option>
              <option value="01">公司</option>
              <option value="02">中介</option>
            </select>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="col-xs-2 control-label">备注：</label>
          <div class="pull-left col-xs-8">
            <textarea name="description" rows="5" style="width: 100%;" tabindex="24"></textarea>
          </div>
        </div>

        <div class="form-group ms-form-group">
          <div class="col-xs-6 col-xs-offset-3 ms-operation-group top-margin-20 text-center">
            <div class="col-xs-5">
              <button type="reset" class="btn btn-block btn-default btn-remove">重置</button>
            </div>
            <div class="col-xs-5">
              <button type="submit" class="btn btn-block btn-primary btn-submit">保存</button>
            </div>
          </div>
        </div>

      </form>
    </div>
  </div>
  
  <%@ include file="/WEB-INF/include/script.jsp" %>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/supplier/management/driver/driver-create.js"/>
  <script type="text/javascript">
    require(['page/supplier/management/driver/driver-create'], function (page) {
      page.init()
    })
  </script>

</body>
</html>